/*
 SplatterAppDelegate.h
 
 The main application class that handles Bonjour networking
 as well as sets up the entire Splatter application.

 Created by David Kikuta.
 */

#import <UIKit/UIKit.h>

#import "BrowserViewController.h"
#import "Picker.h"
#import "TCPServer.h"

@class SplatterViewController;

@interface SplatterAppDelegate : NSObject <UIApplicationDelegate, UIActionSheetDelegate,
										   BrowserViewControllerDelegate, TCPServerDelegate,
										   NSStreamDelegate>
{
    UIWindow               *window;
    SplatterViewController *viewController;	
	Picker                 *picker;
	TCPServer              *server;
	NSInputStream          *inStream;
	NSOutputStream         *outStream;
	BOOL                   inReady;
	BOOL                   outReady;
	int                    packetBodySize;
	NSString               *serverName;	
	NSMutableData          *incomingDataBuffer;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet SplatterViewController *viewController;
@property (nonatomic, retain) NSString *serverName;

- (void) presentPicker:(NSString *)name;
- (void) destroyPicker;
- (void) send:(NSDictionary *)dict;
- (void) disconnectStreams;


@end

